import { defineStore } from 'pinia'
import type { Project } from '@/types/ProjectType'
import type { User } from '@/types/userType'

const user: User = {
  id: -1,
  username: 'null',
  type: 'null'
}

interface State {
  project: Project
}

export const useProjectstore = defineStore('project', {
  state: (): State => {
    return {
      project: {
        id: -1,
        name: '',
        reason: '',
        status: '',
        labAdmin: user,
        standards: []
      }
    }
  },
  persist: true
})
